<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"vchao.top","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="# 前言 现在都流行立体式的互联网，一般公司都会有自己的APP，网站，微信公众号，小程序等众多流量入口。为了更好的用户体验，也为了提高用户粘度，打通这些程序的入口，使其联动成为一体十分重要，以此达到相互引流的作用。APP和网页之间的联动最为常见。很多网页都有这样的功能：在网页点击某一个按钮，或者跳转到某一网页之后，就会唤醒APP，以此达到联动效果。 分析我们都知道各个系统用的开发语言不尽相同，那">
<meta property="og:type" content="article">
<meta property="og:title" content="安卓：从网页唤醒APP">
<meta property="og:url" content="http://vchao.top/2018/03/19/%E5%AE%89%E5%8D%93%EF%BC%9A%E4%BB%8E%E7%BD%91%E9%A1%B5%E5%94%A4%E9%86%92APP/index.html">
<meta property="og:site_name" content="乘风破浪">
<meta property="og:description" content="# 前言 现在都流行立体式的互联网，一般公司都会有自己的APP，网站，微信公众号，小程序等众多流量入口。为了更好的用户体验，也为了提高用户粘度，打通这些程序的入口，使其联动成为一体十分重要，以此达到相互引流的作用。APP和网页之间的联动最为常见。很多网页都有这样的功能：在网页点击某一个按钮，或者跳转到某一网页之后，就会唤醒APP，以此达到联动效果。 分析我们都知道各个系统用的开发语言不尽相同，那">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2018-03-19T07:26:00.000Z">
<meta property="article:modified_time" content="2021-08-25T14:37:20.806Z">
<meta property="article:author" content="vchao">
<meta property="article:tag" content="Android">
<meta property="article:tag" content="Android Studio">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://vchao.top/2018/03/19/%E5%AE%89%E5%8D%93%EF%BC%9A%E4%BB%8E%E7%BD%91%E9%A1%B5%E5%94%A4%E9%86%92APP/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>安卓：从网页唤醒APP | 乘风破浪</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">乘风破浪</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://vchao.top/2018/03/19/%E5%AE%89%E5%8D%93%EF%BC%9A%E4%BB%8E%E7%BD%91%E9%A1%B5%E5%94%A4%E9%86%92APP/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="vchao">
      <meta itemprop="description" content="怀揣好奇，梦想改变世界的菜鸟极客">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="乘风破浪">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          安卓：从网页唤醒APP
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2018-03-19 15:26:00" itemprop="dateCreated datePublished" datetime="2018-03-19T15:26:00+08:00">2018-03-19</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-08-25 22:37:20" itemprop="dateModified" datetime="2021-08-25T22:37:20+08:00">2021-08-25</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index"><span itemprop="name">Android</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>﻿# 前言</p>
<p>现在都流行立体式的互联网，一般公司都会有自己的APP，网站，微信公众号，小程序等众多流量入口。为了更好的用户体验，也为了提高用户粘度，打通这些程序的入口，使其联动成为一体十分重要，以此达到相互引流的作用。<br>APP和网页之间的联动最为常见。很多网页都有这样的功能：在网页点击某一个按钮，或者跳转到某一网页之后，就会唤醒APP，以此达到联动效果。</p>
<h1 id="分析"><a href="#分析" class="headerlink" title="分析"></a>分析</h1><p>我们都知道各个系统用的开发语言不尽相同，那么这种效果到底是如何做的呢？<br>答案就是……scheme。<br>对应到安卓中就是具体表现为 xml 中的 android:scheme 属性，通过&lt;intent-filter&gt; 设置data，已达到类似Intent的隐式匹配的效果。<br>当然跳转之前还需要做次判断，如果手机中没有安装APP，则跳转到对应的下载网页。</p>
<blockquote>
<p>从网页打开APP，如果没有安装就进行下载。当然，也可以做别的操作处理，比如跳转应用市场一类的详情页面。在此仅提供思路，欢迎发散思维。</p>
</blockquote>
<p>网页唤醒APP，除了安卓外，ios也可以达到同样效果。不过scheme等略有不同，这就需要在网页中去判断当前设备是否是安卓设备。常见的判断方法就是通过网络请求中的UA去判断。</p>
<blockquote>
<p>UA，全称是 User Agent，中文名为用户代理，它是一个特殊字符串头，使得服务器能够识别客户使用的操作系统及版本、CPU 类型、浏览器及版本、浏览器渲染引擎、浏览器语言、浏览器插件等。</p>
</blockquote>
<p>言归正传 ，我们来看一下如何实现</p>
<h1 id="实现"><a href="#实现" class="headerlink" title="实现"></a>实现</h1><h2 id="安卓AndroidMainfext-xml"><a href="#安卓AndroidMainfext-xml" class="headerlink" title="安卓AndroidMainfext.xml"></a>安卓AndroidMainfext.xml</h2><p>首先需要指定要启动哪一个Activity，然后为该activity设置添加intent-filter。<br>在要启动的activity下面添加一个intent-filter。</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"> <span class="tag">&lt;<span class="name">intent-filter</span>&gt;</span></span><br><span class="line">     <span class="tag">&lt;<span class="name">action</span> <span class="attr">android:name</span>=<span class="string">&quot;android.intent.action.VIEW&quot;</span> /&gt;</span></span><br><span class="line">     <span class="tag">&lt;<span class="name">category</span> <span class="attr">android:name</span>=<span class="string">&quot;android.intent.category.DEFAULT&quot;</span> /&gt;</span></span><br><span class="line">     <span class="tag">&lt;<span class="name">category</span> <span class="attr">android:name</span>=<span class="string">&quot;android.intent.category.BROWSABLE&quot;</span> /&gt;</span></span><br><span class="line">     <span class="tag">&lt;<span class="name">data</span> <span class="attr">android:host</span>=<span class="string">&quot;splash&quot;</span> <span class="attr">android:scheme</span>=<span class="string">&quot;vchao&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">intent-filter</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h2 id="html-网页"><a href="#html-网页" class="headerlink" title="html 网页"></a>html 网页</h2><p>在网页中，我们这里只做了简单的处理，点击的时候进行判断跳转。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!doctype <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;Content-Type&quot;</span> <span class="attr">content</span>=<span class="string">&quot;text/html; charset=utf-8&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;apple-mobile-web-app-capable&quot;</span> <span class="attr">content</span>=<span class="string">&quot;yes&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;apple-mobile-web-app-status-bar-style&quot;</span> <span class="attr">content</span>=<span class="string">&quot;black&quot;</span>/&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">title</span>&gt;</span>唤醒APP<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">id</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,minimal-ui&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">a</span> <span class="attr">id</span>=<span class="string">&quot;J-call-app&quot;</span> <span class="attr">href</span>=<span class="string">&quot;javascript:;&quot;</span> <span class="attr">class</span>=<span class="string">&quot;label&quot;</span>&gt;</span>立即打开<span class="symbol">&amp;gt;</span><span class="symbol">&amp;gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">input</span> <span class="attr">id</span>=<span class="string">&quot;J-download-app&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">name</span>=<span class="string">&quot;storeurl&quot;</span> <span class="attr">value</span>=<span class="string">&quot;http://m.chanyouji.cn/apk/chanyouji-2.2.0.apk&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></span><br><span class="line"><span class="javascript">            (<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span></span><br><span class="line"><span class="javascript">                <span class="comment">/*获取UA标识，并转为小写*/</span></span></span><br><span class="line"><span class="javascript">                <span class="keyword">var</span> ua = navigator.userAgent.toLowerCase();</span></span><br><span class="line"><span class="javascript">                <span class="keyword">var</span> t;</span></span><br><span class="line"><span class="javascript">                <span class="keyword">var</span> config = &#123;</span></span><br><span class="line"><span class="javascript">                    <span class="comment">/*scheme:必须*/</span></span></span><br><span class="line"><span class="javascript">                    <span class="attr">scheme_IOS</span>: <span class="string">&#x27;vchao://&#x27;</span>,</span></span><br><span class="line"><span class="javascript">                    <span class="attr">scheme_Adr</span>: <span class="string">&#x27;vchao://splash&#x27;</span>,</span></span><br><span class="line"><span class="javascript">                    <span class="attr">download_url</span>: <span class="built_in">document</span>.getElementById(<span class="string">&#x27;J-download-app&#x27;</span>).value,</span></span><br><span class="line"><span class="javascript">                    <span class="attr">timeout</span>: <span class="number">600</span></span></span><br><span class="line"><span class="javascript">                &#125;;</span></span><br><span class="line"><span class="javascript"></span></span><br><span class="line"><span class="javascript">                <span class="function"><span class="keyword">function</span> <span class="title">openclient</span>(<span class="params"></span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">                    <span class="keyword">var</span> startTime = <span class="built_in">Date</span>.now();</span></span><br><span class="line"><span class="javascript"></span></span><br><span class="line"><span class="javascript">                    <span class="keyword">var</span> ifr = <span class="built_in">document</span>.createElement(<span class="string">&#x27;iframe&#x27;</span>);</span></span><br><span class="line"><span class="javascript">                    </span></span><br><span class="line"><span class="javascript">                    <span class="comment">/*通过UA标识，判断是否是苹果系统*/</span></span></span><br><span class="line"><span class="javascript">                    ifr.src = ua.indexOf(<span class="string">&#x27;os&#x27;</span>) &gt; <span class="number">0</span> ? config.scheme_IOS : config.scheme_Adr;</span></span><br><span class="line"><span class="javascript">                    ifr.style.display = <span class="string">&#x27;none&#x27;</span>;</span></span><br><span class="line"><span class="javascript">                    <span class="built_in">document</span>.body.appendChild(ifr);</span></span><br><span class="line"><span class="javascript"></span></span><br><span class="line"><span class="javascript">                    <span class="keyword">var</span> t = <span class="built_in">setTimeout</span>(<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">                        <span class="keyword">var</span> endTime = <span class="built_in">Date</span>.now();</span></span><br><span class="line"><span class="javascript"></span></span><br><span class="line"><span class="javascript">                        <span class="keyword">if</span> (!startTime || endTime - startTime &lt; config.timeout + <span class="number">200</span>) &#123; </span></span><br><span class="line"><span class="javascript">                            <span class="built_in">window</span>.location = config.download_url;</span></span><br><span class="line"><span class="javascript">                        &#125; <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="javascript">                            </span></span><br><span class="line"><span class="javascript">                        &#125;</span></span><br><span class="line"><span class="javascript">                    &#125;, config.timeout);</span></span><br><span class="line"><span class="javascript"></span></span><br><span class="line"><span class="javascript">                    <span class="built_in">window</span>.onblur = <span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">                        <span class="built_in">clearTimeout</span>(t);</span></span><br><span class="line"><span class="javascript">                    &#125;</span></span><br><span class="line"><span class="javascript">                &#125;</span></span><br><span class="line"><span class="javascript">                <span class="built_in">window</span>.addEventListener(<span class="string">&quot;DOMContentLoaded&quot;</span>, <span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span></span><br><span class="line"><span class="javascript">                    <span class="built_in">document</span>.getElementById(<span class="string">&quot;J-call-app&quot;</span>).addEventListener(<span class="string">&#x27;click&#x27;</span>,openclient,<span class="literal">false</span>);</span></span><br><span class="line"><span class="javascript"></span></span><br><span class="line"><span class="javascript">                &#125;, <span class="literal">false</span>);</span></span><br><span class="line"><span class="javascript">            &#125;)()</span></span><br><span class="line"><span class="javascript">        </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="如果需要传参数。"><a href="#如果需要传参数。" class="headerlink" title="如果需要传参数。"></a>如果需要传参数。</h2><p>在html网页中直接拼接参数。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vchao://splash/?arg0=marc&amp;arg1=xie</span><br></pre></td></tr></table></figure>
<p>在唤醒的activity页面做参数的接收。</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">Uri uri = getIntent().getData();  </span><br><span class="line"> <span class="keyword">if</span> (uri != <span class="keyword">null</span>) &#123;  </span><br><span class="line">     String test1 = uri.getQueryParameter(<span class="string">&quot;arg0&quot;</span>);  </span><br><span class="line">     String test2 = uri.getQueryParameter(<span class="string">&quot;arg1&quot;</span>);  </span><br><span class="line">     tv.setText(test1 + test2);  </span><br><span class="line"> &#125;  </span><br></pre></td></tr></table></figure>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Android/" rel="tag"># Android</a>
              <a href="/tags/Android-Studio/" rel="tag"># Android Studio</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2018/03/12/%E5%AE%89%E5%8D%93%EF%BC%9A%E4%B8%89%E5%88%86%E9%92%9F%E5%AE%9E%E7%8E%B0%E7%89%A9%E6%B5%81%E9%85%8D%E9%80%81%E9%A1%B5%E9%9D%A2%EF%BC%88%E6%97%B6%E9%97%B4%E8%BD%B4%E6%95%88%E6%9E%9C%EF%BC%89/" rel="prev" title="安卓：三分钟实现物流配送页面（时间轴效果）">
      <i class="fa fa-chevron-left"></i> 安卓：三分钟实现物流配送页面（时间轴效果）
    </a></div>
      <div class="post-nav-item">
    <a href="/2018/04/03/%E5%AE%89%E5%8D%93%E5%9F%BA%E7%A1%80%E6%9D%83%E9%99%90%E6%80%BB%E7%BB%93/" rel="next" title="安卓基础权限总结">
      安卓基础权限总结 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%88%86%E6%9E%90"><span class="nav-number">1.</span> <span class="nav-text">分析</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%9E%E7%8E%B0"><span class="nav-number">2.</span> <span class="nav-text">实现</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E5%8D%93AndroidMainfext-xml"><span class="nav-number">2.1.</span> <span class="nav-text">安卓AndroidMainfext.xml</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#html-%E7%BD%91%E9%A1%B5"><span class="nav-number">2.2.</span> <span class="nav-text">html 网页</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%A6%82%E6%9E%9C%E9%9C%80%E8%A6%81%E4%BC%A0%E5%8F%82%E6%95%B0%E3%80%82"><span class="nav-number">2.3.</span> <span class="nav-text">如果需要传参数。</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">vchao</p>
  <div class="site-description" itemprop="description">怀揣好奇，梦想改变世界的菜鸟极客</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">46</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">27</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">冀ICP备 17022751号-1 </a>
      <img src="https://beian.miit.gov.cn" style="display: inline-block;">
  </div>

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">vchao</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
